{$contents}

{literal}
<div style="text-align:left; padding:10px;">
<h2>Source</h2>

<pre class="code">
&lt;?php
$post = DomFgPost::getInstance();
		
if( $post->save) {
	$save = array(
		'type' => 'ok',
		'message' => 'You submitted form!'
	);
}
		
if( $post->cancel ) {
	$cacel =array(
		'type' => 'warning',
		'message' => 'You cancelled form!',
	);
}
		
// ----------------------------------
// MAIN PANEL
// ----------------------------------
$panel = array(
	'type' => 'tabPanel',
	'action' => $this->getUrl('advancedFormSample1'),
	'style' => 'width: 800px; margin-left: 15px;',
	'tabsStyle' => 'width: 800px;  margin-left: 15px;',
	'headerTabs' => true,
);
		
		
// ----------------------------------
// TAB 1
// ----------------------------------
$tab1 = array(
	'type' => 'panel',
	'title' => 'Public info',
	'layout' => 'table',
	'layoutConfig' => array(
		'columns' => 2,
		'columnWidths' => array(500,300),
	),
	'items' => array(
		array(
			'type' => 'fieldSet',
			'title' => 'Overall',
			'layout' => 'table',
			'items' => array(
				array(
					'type' => 'textField',
					'title' => 'Firstname',
					'name' => 'firstname'
				),
				array(
					'type' => 'textField',
					'title' => 'Lastname',
					'name' => 'lastname'
				),
				array(
					'type' => 'textField',
					'title' => 'Location',
					'name' => 'location'
				),
				array(
					'type' => 'Select',
					'title' => 'Age',
					'values' => array('5-18','19-25','26-39','40-..'),
					'width' => 90,
				),				
			),
		),
		array(
			'type' => 'fieldSet',
			'title' => 'Contact',
			'layout' => 'table',
			'layoutConfig' => array(
				'columns' => 1,
			),
			'items' => array(
				array(
					'type' => 'title',
					'value' => 'Phone',
					'style' => 'text-align:left',
				),
				array(
					'type' => 'textField',
					'name' => 'phone'
				),
				array(
					'type' => 'title',
					'value' => 'Email',
					'style' => 'text-align:left',
				),
				array(
					'type' => 'textField',
					'name' => 'email'
				),
			),
		),
		array(
			'type' => 'fieldSet',
			'title' => 'Some info',
			'colspan' => 2,
			'layout' => 'table',
			'items' => array(
				array(
					'type' => 'textArea',
					'title' => 'Some info',
					'name' => 'someInfo',
					'style' => 'width:600px',
				),
			),
		),
	),
	'buttons' => array(
		array(
			'title' => 'Save',
			'name' => 'save',
			'style' => 'float:right',
		),
		array(
			'title' => 'Cancel',
			'name' => 'cancel',
			'style' => 'float:left',
		),
	),
);
		
// ----------------------------------
// TAB 2
// ----------------------------------
$tab2 = array(
	'type' => 'fieldSet',
	'title' => 'Private info',
	'items' => array(),
);
		
// ----------------------------------
// TAB 3
// ----------------------------------
$tab3 = array(
	'type' => 'panel',
	'title' => 'Description',
	'items' => array(),
);
		
// ----------------------------------
// ADD TABS TO PANEL
// ----------------------------------
$panel['items'] = array( 
	array(
		'type' => 'info',
		'message' => 'Everything is okay',
		'description' => 'This message is shown before every tab',
	),
	$save,
	$cancel,
	$tab1, 
	$tab2, 
	$tab3,
	array(
		'type' => 'info',
		'message' => 'Everything is okay',
		'description' => 'This message is shown after every tab',
	),
);
		
$this->view->contents = DomFg::render( $panel );	

?&gt;
</pre>
</div>
{/literal}